var config = {
    /**
     * 增删改查，api地址
     * @total 获取总条数api
     * @get   获取数据api
     * @edit  修改数据api
     *
     * model        类名
     * action       方法名 
     */
    set_url: {
        "total": { model: "goods", action: "get_goods_total" },
        "get": { model: "goods", action: "get_goods_all" },
        "edit": { model: "goods", action: "on_goods_edit" }
    },

    /**
     * 筛选配置
     * @type {Array}
     */
    select: [
        [{
            label: "",
            type: "input",
            field: "collection",
            labelWidth: "120",
            placeholder: "请输入单据号或者客户或者备注",
            span: 6
        }, {
            label: "日期",
            type: "daterange",
            field: "collection_date",
            labelWidth: "120",
            placeholder: "选择日期",
            span: 10,
            range: "至",
            start: "请输入开始时间",
            end: "请输入结束时间"
        }],
        [{
            label: "销售人员",
            type: "select",
            field: "sales_preson",
            labelWidth: "120",
            placeholder: "销售人员",
            span: 6,
            option: [{
                label: "一类人员",
                value: 1,
            }, {
                label: "二类人员",
                value: 2,
            }, {
                label: "三类人员",
                value: 3,
            }]
        }, {
            label: "退款状态",
            type: "select",
            field: "collection_status",
            labelWidth: "120",
            placeholder: "退款状态",
            span: 10,
            option: [{
                label: "未退款",
                value: "no_refund",
            }, {
                label: "部分退款",
                value: "part_refund",
            }, {
                label: "全部退款",
                value: "all_refund",
            }]
        }]
    ],


    /**
     * 表格按钮配置
     */
    action: [{
        label: "新增",
        type: "primary",
        icon: "",
        callback: {
            type: "target",
            path: "/empty"
        }
    }, {
        label: "打印",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "设置",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "导入",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "导出",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "关闭",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "启用",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }, {
        label: "删除",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: 'goods_fix',
        }
    }],

    /**
     * 表格配置
     */
    selection: true,
    model: 'input',
    table: [{
        label: '操作',
        type: 'action',
        field: 'action',
        // labelWidth: "400",
        sortable: false,
        option: [{
            label: "修改",
            callback: {
                type: 'target',
                path: "/empty"
            },
            type: "primary",
            icon: "",
        }, {
            label: "删除",
            callback: {
                type: 'message',
                url: ['goods', 'on_goods_delete'],
                params: ['goods_id'],
                config: {
                    type: 'warning',
                    title: '系统提示',
                    content: '此操作将永久删除删除文件不可恢复，是否继续！',
                    confirm: '继续',
                    cancel: '取消',
                    confirmTips: {
                        type: 'success',
                        message: '删除成功！',
                    },
                    cancelTips: {
                        type: 'info',
                        message: '您取消了删除！',
                    }
                }
            },
            type: "primary",
            icon: "",
        }]
    }, {
        label: "单据日期",
        type: "input",
        field: "bills_date",
        labelWidth: 120,
        sortable: true,
        amend: false,
    }, {
        label: "单据编号",
        type: "input",
        field: "bills_sn",
        labelWidth: 120,
        sortable: true,
        amend: false,
    }, {
        label: "销售人员",
        type: "input",
        field: "selas_preson",
        labelWidth: 100,
        sortable: true,
        amend: false,
    }, {
        label: "源销货订单号",
        type: "input",
        field: "source_selas_sn",
        labelWidth: 140,
        sortable: false,
        amend: false,
    }, {
        label: "原销货单号",
        type: "input",
        field: "original_sn",
        labelWidth: 120,
        sortable: false,
        amend: false,
    }, {
        label: "原销货单号",
        type: "input",
        field: "original_number",
        labelWidth: 120,
        sortable: false,
        amend: false,
    }, {
        label: "客户",
        type: "input",
        field: "client_name",
        labelWidth: 140,
        sortable: true,
        amend: false,
    }, {
        label: "数量",
        type: "input",
        field: "number",
        labelWidth: 80,
        sortable: false,
        amend: false,
    }, {
        label: "销售金额",
        type: "input",
        field: "sales_spn",
        labelWidth: "120",
        sortable: true,
        amend: false,
    }, {
        label: "优惠后金额",
        type: "input",
        field: "discountAfterMoney",
        labelWidth: "120",
        sortable: true,
        amend: false,
    }, {
        label: "已退款",
        type: "input",
        field: "refund",
        labelWidth: "120",
        sortable: true,
        amend: false,
    }, {
        label: "退款状态",
        type: "input",
        field: "refund_status",
        labelWidth: "120",
        sortable: true,
        amend: false,
    }, {
        label: "制单人",
        type: "input",
        field: "preson",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "备注",
        type: "input",
        field: "note",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "打印次数",
        type: "input",
        field: "note",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }],

    /**
     * 分页配置
     * @type {Object}
     */
    page: {
        size: 10,
        current: 1,
        total: 100
    }
}
export default config;